home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / AppsToGo / •AppsToGo Reference / •AppsToGo Reference.rsrc / WFMT_216_a136 < prev    next >
Unknown  |  1994-09-22  |  3.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert TTComp Archive (archive/ttcomp) fallback Supported
100% file TTComp archive data, binary, 2K dictionary default (weak)
99% file data default
66% TrID TTComp archive compressed (bin-2K) default (weak)
33% TrID Adobe PhotoShop Brush default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 05 00 01 00 00 00 1a | 00 00 00 00 00 00 00 1a |........|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 05 00 05 00 00 |........|........|
|00000030| 00 22 00 00 00 00 00 00 | 00 22 61 31 33 36 00 00 |."......|."a136..|
|00000040| 4e 16 00 00 20 19 00 00 | 00 00 00 00 00 00 00 00 |N... ...|........|
|00000050| 00 00 08 43 4c 49 6e 73 | 65 72 74 00 00 06 00 00 |...CLIns|ert.....|
|00000060| 00 00 00 af 00 00 00 00 | 00 00 00 af 00 00 00 14 |........|........|
|00000070| 03 c1 00 28 05 7e 00 ff | 00 00 00 00 00 00 0f a8 |...(.~..|........|
|00000080| 00 00 00 00 4e 1c 00 00 | 00 09 00 00 00 04 00 04 |....N...|........|
|00000090| ff fc ff fa 00 04 00 04 | ff fc ff fc 00 00 00 00 |........|........|
|000000a0| 00 00 00 00 83 00 0b 40 | 10 6b 53 63 72 65 65 6e |.......@|.kScreen|
|000000b0| 41 50 49 2f 31 39 39 39 | 36 00 06 47 65 6e 65 76 |API/1999|6..Genev|
|000000c0| 61 00 00 55 73 68 6f 72 | 74 20 43 4c 49 6e 73 65 |a..Ushor|t CLInse|
|000000d0| 72 74 28 4c 69 73 74 48 | 61 6e 64 6c 65 20 6c 69 |rt(ListH|andle li|
|000000e0| 73 74 48 6e 64 6c 2c 20 | 63 68 61 72 20 2a 64 61 |stHndl, |char *da|
|000000f0| 74 61 2c 20 73 68 6f 72 | 74 20 64 61 74 61 4c 65 |ta, shor|t dataLe|
|00000100| 6e 2c 20 73 68 6f 72 74 | 20 72 6f 77 2c 20 73 68 |n, short| row, sh|
|00000110| 6f 72 74 20 63 6f 6c 29 | 3b 00 00 00 06 00 00 00 |ort col)|;.......|
|00000120| 00 00 89 00 00 00 00 00 | 00 00 89 00 00 00 00 03 |........|........|
|00000130| c1 00 14 05 7e 00 ff 00 | 00 00 00 00 00 0f a8 00 |....~...|........|
|00000140| 00 00 00 4e 1d 00 00 00 | 09 00 00 00 04 00 04 ff |...N....|........|
|00000150| fc ff fa 00 04 00 04 ff | fc ff fc 00 00 00 00 00 |........|........|
|00000160| 00 00 00 83 00 0b 40 14 | 6b 53 63 72 65 65 6e 4f |......@.|kScreenO|
|00000170| 6e 65 4c 69 6e 65 2f 31 | 39 39 39 37 00 06 47 65 |neLine/1|9997..Ge|
|00000180| 6e 65 76 61 00 00 2b 49 | 6e 73 65 72 74 20 61 20 |neva..+I|nsert a |
|00000190| 63 65 6c 6c 20 61 6c 70 | 68 61 62 65 74 69 63 61 |cell alp|habetica|
|000001a0| 6c 6c 79 20 69 6e 74 6f | 20 74 68 65 20 6c 69 73 |lly into| the lis|
|000001b0| 74 2e 00 00 00 06 00 00 | 00 00 00 44 00 00 00 00 |t.......|...D....|
|000001c0| 00 00 00 44 00 00 00 00 | 02 6b 04 40 02 6c 01 00 |...D....|.k.@.l..|
|000001d0| 00 00 00 00 00 01 0f f1 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 0c 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 00 00 00 00 00 00 00 00 | 00 06 00 00 00 00 00 77 |........|.......w|
|00000210| 00 00 00 00 00 00 00 77 | 00 00 00 00 02 6b 02 28 |.......w|.....k.(|
|00000220| 03 c1 00 ff 00 00 00 00 | 00 00 0f a8 00 00 00 00 |........|........|
|00000230| 4e 16 00 00 00 09 00 00 | 00 04 00 04 ff fc ff fa |N.......|........|
|00000240| 00 04 00 04 ff fc ff fc | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 83 00 0b 40 0b 6c 69 6e | 6b 73 2f 31 39 39 39 30 |...@.lin|ks/19990|
|00000260| 00 06 4d 6f 6e 61 63 6f | 00 00 0c 61 31 33 41 2c |..Monaco|...a13A,|
|00000270| 43 4c 4e 65 78 74 0d 00 | 16 00 01 00 00 00 00 00 |CLNext..|........|
|00000280| 10 00 0c 00 01 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000290| 06 00 00 00 00 0c e4 00 | 00 00 00 00 00 0c e4 00 |........|........|
|000002a0| 00 00 00 00 00 75 30 02 | 6b 01 ff 00 00 00 00 00 |.....u0.|k.......|
|000002b0| 00 0f a8 00 00 00 00 4e | 1f 00 00 00 09 00 00 00 |.......N|........|
|000002c0| 04 00 04 ff fc ff fa 00 | 04 00 04 ff fc ff fc 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 83 | 00 0b 40 0a 62 6f 64 79 |........|..@.body|
|000002e0| 2f 31 39 39 39 39 00 06 | 4d 6f 6e 61 63 6f 00 0c |/19999..|Monaco..|
|000002f0| 52 73 68 6f 72 74 20 43 | 4c 49 6e 73 65 72 74 28 |Rshort C|LInsert(|
|00000300| 4c 69 73 74 48 61 6e 64 | 6c 65 20 6c 69 73 74 48 |ListHand|le listH|
|00000310| 6e 64 6c 2c 20 63 68 61 | 72 20 2a 64 61 74 61 2c |ndl, cha|r *data,|
|00000320| 20 73 68 6f 72 74 20 64 | 61 74 61 4c 65 6e 2c 20 | short d|ataLen, |
|00000330| 73 68 6f 72 74 20 72 6f | 77 2c 20 73 68 6f 72 74 |short ro|w, short|
|00000340| 20 63 6f 6c 29 3b 0d 0d | 20 20 20 20 46 69 6c 65 | col);..| File|
|00000350| 3a 20 4c 69 73 74 43 6f | 6e 74 72 6f 6c 2e 68 0d |: ListCo|ntrol.h.|
|00000360| 0d 49 4e 50 55 54 3a 20 | 20 6c 69 73 74 48 6e 64 |.INPUT: | listHnd|
|00000370| 6c 20 20 20 20 54 68 65 | 20 6c 69 73 74 20 74 6f |l The| list to|
|00000380| 20 62 65 20 69 6e 73 65 | 72 74 65 64 20 69 6e 74 | be inse|rted int|
|00000390| 6f 2e 0d 20 20 20 20 20 | 20 20 20 64 61 74 61 20 |o.. | data |
|000003a0| 20 20 20 20 20 20 20 50 | 6f 69 6e 74 65 72 20 74 | P|ointer t|
|000003b0| 6f 20 64 61 74 61 20 74 | 6f 20 69 6e 73 65 72 74 |o data t|o insert|
|000003c0| 2e 0d 20 20 20 20 20 20 | 20 20 64 61 74 61 4c 65 |.. | dataLe|
|000003d0| 6e 20 20 20 20 20 4c 65 | 6e 67 74 68 20 6f 66 20 |n Le|ngth of |
|000003e0| 64 61 74 61 20 74 6f 20 | 69 6e 73 65 72 74 2e 0d |data to |insert..|
|000003f0| 20 20 20 20 20 20 20 20 | 72 6f 77 20 20 20 20 20 | |row |
|00000400| 20 20 20 20 52 6f 77 20 | 74 6f 20 69 6e 73 65 72 | Row |to inser|
|00000410| 74 20 69 6e 74 6f 20 28 | 6f 72 20 2d 31 20 69 66 |t into (|or -1 if|
|00000420| 20 74 6f 20 62 65 20 64 | 65 74 65 72 6d 69 6e 65 | to be d|etermine|
|00000430| 64 29 2e 0d 20 20 20 20 | 20 20 20 20 63 6f 6c 20 |d).. | col |
|00000440| 20 20 20 20 20 20 20 20 | 43 6f 6c 75 6d 6e 20 74 | |Column t|
|00000450| 6f 20 69 6e 73 65 72 74 | 20 69 6e 74 6f 20 28 6f |o insert| into (o|
|00000460| 72 20 2d 31 20 69 66 20 | 74 6f 20 62 65 20 64 65 |r -1 if |to be de|
|00000470| 74 65 72 6d 69 6e 65 64 | 29 2e 0d 52 45 53 55 4c |termined|)..RESUL|
|00000480| 54 3a 20 73 68 6f 72 74 | 20 20 20 20 20 20 20 54 |T: short| T|
|00000490| 68 65 20 70 6f 73 69 74 | 69 6f 6e 20 61 74 20 77 |he posit|ion at w|
|000004a0| 68 69 63 68 20 74 68 65 | 20 64 61 74 61 20 77 61 |hich the| data wa|
|000004b0| 73 20 69 6e 73 65 72 74 | 65 64 2e 0d 0d 49 6e 73 |s insert|ed...Ins|
|000004c0| 65 72 74 20 61 20 63 65 | 6c 6c 20 61 6c 70 68 61 |ert a ce|ll alpha|
|000004d0| 62 65 74 69 63 61 6c 6c | 79 20 69 6e 74 6f 20 74 |beticall|y into t|
|000004e0| 68 65 20 6c 69 73 74 2e | 20 20 57 68 69 63 68 65 |he list.| Whiche|
|000004f0| 76 65 72 20 70 61 72 61 | 6d 65 74 65 72 20 69 73 |ver para|meter is|
|00000500| 20 70 61 73 73 65 64 20 | 69 6e 20 61 73 20 2d 31 | passed |in as -1|
|00000510| 2c 20 65 69 74 68 65 72 | 0d 72 6f 77 20 6f 72 20 |, either|.row or |
|00000520| 63 6f 6c 75 6d 6e 2c 20 | 74 68 61 74 20 69 73 20 |column, |that is |
|00000530| 74 68 65 20 64 69 6d 65 | 6e 73 69 6f 6e 20 74 68 |the dime|nsion th|
|00000540| 61 74 20 69 73 20 64 65 | 74 65 72 6d 69 6e 65 64 |at is de|termined|
|00000550| 2e 20 20 54 68 65 20 6d | 65 74 68 6f 64 20 6f 66 |. The m|ethod of|
|00000560| 20 68 61 6e 64 6c 69 6e | 67 20 68 65 0d 63 6f 6d | handlin|g he.com|
|00000570| 70 61 72 69 73 6f 6e 73 | 20 68 61 73 20 62 65 65 |parisons| has bee|
|00000580| 6e 20 63 68 61 6e 67 65 | 64 20 74 6f 20 61 6c 6c |n change|d to all|
|00000590| 6f 77 20 63 75 73 74 6f | 6d 69 7a 61 74 69 6f 6e |ow custo|mization|
|000005a0| 20 6f 66 20 74 68 65 20 | 6c 69 73 74 20 64 61 74 | of the |list dat|
|000005b0| 61 20 61 6e 64 20 73 65 | 61 72 63 68 20 6d 65 74 |a and se|arch met|
|000005c0| 68 6f 64 73 2e 0d 42 65 | 66 6f 72 65 2c 20 69 74 |hods..Be|fore, it|
|000005d0| 20 77 61 73 20 61 73 73 | 75 6d 65 64 20 74 68 61 | was ass|umed tha|
|000005e0| 74 20 74 68 65 20 63 65 | 6c 6c 20 63 6f 6e 74 65 |t the ce|ll conte|
|000005f0| 6e 74 20 77 61 73 20 74 | 65 78 74 2c 20 61 6e 64 |nt was t|ext, and|
|00000600| 20 74 68 61 74 20 74 68 | 65 20 64 65 66 61 75 6c | that th|e defaul|
|00000610| 74 20 4c 44 45 46 20 77 | 61 73 20 62 65 69 6e 67 |t LDEF w|as being|
|00000620| 0d 75 73 65 64 2e 20 20 | 49 66 20 79 6f 75 20 77 |.used. |If you w|
|00000630| 72 69 74 65 20 61 20 63 | 75 73 74 6f 6d 20 4c 44 |rite a c|ustom LD|
|00000640| 45 46 20 74 68 61 74 20 | 75 73 65 73 20 61 20 64 |EF that |uses a d|
|00000650| 69 66 66 65 72 65 6e 74 | 20 64 61 74 61 20 66 6f |ifferent| data fo|
|00000660| 72 6d 61 74 2c 20 79 6f | 75 20 68 61 64 20 70 72 |rmat, yo|u had pr|
|00000670| 6f 62 6c 65 6d 73 20 62 | 65 66 6f 72 65 2e 0d 4e |oblems b|efore..N|
|00000680| 6f 77 2c 20 77 69 74 68 | 20 74 68 65 20 61 64 64 |ow, with| the add|
|00000690| 69 74 69 6f 6e 20 6f 66 | 20 74 77 6f 20 70 72 6f |ition of| two pro|
|000006a0| 63 65 64 75 72 65 20 70 | 6f 69 6e 74 65 72 73 2c |cedure p|ointers,|
|000006b0| 20 79 6f 75 20 63 61 6e | 20 63 75 73 74 6f 6d 69 | you can| customi|
|000006c0| 7a 65 20 74 68 65 20 64 | 61 74 61 20 63 6f 6d 70 |ze the d|ata comp|
|000006d0| 61 72 69 73 6f 6e 73 2e | 0d 54 68 65 20 74 77 6f |arisons.|.The two|
|000006e0| 20 6e 65 77 20 70 72 6f | 63 73 20 61 72 65 3a 0d | new pro|cs are:.|
|000006f0| 20 20 20 20 31 29 20 67 | 65 74 43 6f 6d 70 61 72 | 1) g|etCompar|
|00000700| 65 44 61 74 61 0d 20 20 | 20 20 32 29 20 64 6f 43 |eData. | 2) doC|
|00000710| 6f 6d 70 61 72 65 44 61 | 74 61 0d 54 68 65 20 66 |ompareDa|ta.The f|
|00000720| 69 72 73 74 20 70 72 6f | 63 2c 20 67 65 74 43 6f |irst pro|c, getCo|
|00000730| 6d 70 61 72 65 44 61 74 | 61 2c 20 69 66 20 6e 69 |mpareDat|a, if ni|
|00000740| 6c 2c 20 73 69 6d 70 6c | 79 20 67 65 74 73 20 74 |l, simpl|y gets t|
|00000750| 68 65 20 64 61 74 61 20 | 6f 75 74 20 6f 66 20 74 |he data |out of t|
|00000760| 68 65 20 63 65 6c 6c 20 | 66 6f 72 20 63 6f 6d 70 |he cell |for comp|
|00000770| 61 72 69 73 6f 6e 0d 70 | 75 72 70 6f 73 65 73 2e |arison.p|urposes.|
|00000780| 20 20 49 66 20 69 74 20 | 69 73 20 6e 6f 74 20 6e | If it |is not n|
|00000790| 69 6c 2c 20 74 68 65 6e | 20 74 68 65 20 70 72 6f |il, then| the pro|
|000007a0| 63 20 69 73 20 63 61 6c | 6c 65 64 2c 20 61 6e 64 |c is cal|led, and|
|000007b0| 20 74 68 65 20 70 72 6f | 63 20 67 65 74 73 20 74 | the pro|c gets t|
|000007c0| 68 65 20 64 61 74 61 20 | 6f 75 74 20 6f 66 20 74 |he data |out of t|
|000007d0| 68 65 0d 63 65 6c 6c 2e | 20 20 54 68 65 20 70 72 |he.cell.| The pr|
|000007e0| 6f 63 20 63 61 6e 20 74 | 68 65 6e 20 67 65 74 20 |oc can t|hen get |
|000007f0| 77 68 61 74 65 76 65 72 | 20 64 61 74 61 20 69 74 |whatever| data it|
|00000800| 20 6e 65 65 64 73 20 74 | 6f 20 66 6f 72 20 74 68 | needs t|o for th|
|00000810| 65 20 70 75 72 70 6f 73 | 65 20 6f 66 20 63 6f 6d |e purpos|e of com|
|00000820| 70 61 72 69 6e 67 20 74 | 6f 20 6f 74 68 65 72 0d |paring t|o other.|
|00000830| 63 65 6c 6c 73 20 61 6e | 64 20 66 69 6e 64 69 6e |cells an|d findin|
|00000840| 67 20 74 68 65 20 69 6e | 73 65 72 74 20 6c 6f 63 |g the in|sert loc|
|00000850| 61 74 69 6f 6e 20 69 6e | 20 74 68 65 20 6c 69 73 |ation in| the lis|
|00000860| 74 2e 20 20 54 68 65 20 | 73 65 63 6f 6e 64 20 70 |t. The |second p|
|00000870| 72 6f 63 2c 20 64 6f 43 | 6f 6d 70 61 72 65 44 61 |roc, doC|ompareDa|
|00000880| 74 61 2c 20 69 66 20 6e | 69 6c 0d 74 65 6c 6c 73 |ta, if n|il.tells|
|00000890| 20 74 68 65 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f | the Lis|t contro|
|000008a0| 6c 20 74 6f 20 63 61 6c | 6c 20 49 55 4d 61 67 53 |l to cal|l IUMagS|
|000008b0| 74 72 69 6e 67 20 66 6f | 72 20 74 68 65 20 70 75 |tring fo|r the pu|
|000008c0| 72 70 6f 73 65 20 6f 66 | 20 63 6f 6d 70 61 72 69 |rpose of| compari|
|000008d0| 73 6f 6e 2e 20 20 49 66 | 20 69 74 20 69 73 20 6e |son. If| it is n|
|000008e0| 6f 74 20 6e 69 6c 2c 0d | 74 68 65 6e 20 74 68 65 |ot nil,.|then the|
|000008f0| 20 70 72 6f 63 20 69 73 | 20 63 61 6c 6c 65 64 20 | proc is| called |
|00000900| 69 6e 73 74 65 61 64 20 | 6f 66 20 49 55 4d 61 67 |instead |of IUMag|
|00000910| 53 74 72 69 6e 67 2c 20 | 61 6e 64 20 79 6f 75 20 |String, |and you |
|00000920| 63 61 6e 20 64 6f 20 77 | 68 61 74 65 76 65 72 20 |can do w|hatever |
|00000930| 6b 69 6e 64 20 6f 66 20 | 63 6f 6d 70 61 72 69 73 |kind of |comparis|
|00000940| 6f 6e 0d 79 6f 75 20 77 | 69 73 68 2e 20 20 59 6f |on.you w|ish. Yo|
|00000950| 75 72 20 70 72 6f 63 20 | 69 73 20 61 20 72 65 70 |ur proc |is a rep|
|00000960| 6c 61 63 65 6d 65 6e 74 | 20 66 6f 72 20 49 55 4d |lacement| for IUM|
|00000970| 61 67 53 74 72 69 6e 67 | 2c 20 73 6f 20 69 74 20 |agString|, so it |
|00000980| 73 68 6f 75 6c 64 20 62 | 65 20 6f 66 20 74 68 61 |should b|e of tha|
|00000990| 74 20 66 6f 72 6d 2c 20 | 65 78 63 65 70 74 0d 74 |t form, |except.t|
|000009a0| 68 61 74 20 74 68 65 20 | 70 72 6f 74 6f 74 79 70 |hat the |prototyp|
|000009b0| 65 20 69 73 20 61 20 43 | 20 70 72 6f 74 6f 74 79 |e is a C| prototy|
|000009c0| 70 65 2c 20 69 6e 73 74 | 65 61 64 20 6f 66 20 74 |pe, inst|ead of t|
|000009d0| 79 70 65 20 70 61 73 63 | 61 6c 2e 0d 0d 54 68 65 |ype pasc|al...The|
|000009e0| 20 70 72 6f 74 6f 74 79 | 70 65 73 20 61 72 65 3a | prototy|pes are:|
|000009f0| 0d 0d 74 79 70 65 64 65 | 66 20 76 6f 69 64 20 20 |..typede|f void |
|00000a00| 28 2a 43 4c 47 65 74 43 | 6f 6d 70 61 72 65 44 61 |(*CLGetC|ompareDa|
|00000a10| 74 61 50 72 6f 63 50 74 | 72 29 28 76 6f 69 64 20 |taProcPt|r)(void |
|00000a20| 2a 73 72 63 2c 20 73 68 | 6f 72 74 20 73 72 63 6c |*src, sh|ort srcl|
|00000a30| 65 6e 2c 20 76 6f 69 64 | 20 2a 64 73 74 2c 20 73 |en, void| *dst, s|
|00000a40| 68 6f 72 74 20 2a 64 73 | 74 6c 65 6e 29 3b 0d 74 |hort *ds|tlen);.t|
|00000a50| 79 70 65 64 65 66 20 73 | 68 6f 72 74 20 28 2a 43 |ypedef s|hort (*C|
|00000a60| 4c 44 6f 43 6f 6d 70 61 | 72 65 44 61 74 61 50 72 |LDoCompa|reDataPr|
|00000a70| 6f 63 50 74 72 29 28 76 | 6f 69 64 20 2a 70 74 72 |ocPtr)(v|oid *ptr|
|00000a80| 61 2c 20 76 6f 69 64 20 | 2a 70 74 72 62 2c 20 73 |a, void |*ptrb, s|
|00000a90| 68 6f 72 74 20 6c 65 6e | 61 2c 20 73 68 6f 72 74 |hort len|a, short|
|00000aa0| 20 6c 65 6e 62 29 3b 0d | 0d 54 68 65 20 47 65 74 | lenb);.|.The Get|
|00000ab0| 43 6f 6d 70 61 72 65 44 | 61 74 61 20 70 72 6f 63 |CompareD|ata proc|
|00000ac0| 20 69 73 20 70 61 73 73 | 65 64 20 69 6e 20 61 20 | is pass|ed in a |
|00000ad0| 72 65 66 65 72 65 6e 63 | 65 20 74 6f 20 74 68 65 |referenc|e to the|
|00000ae0| 20 64 61 74 61 2c 20 61 | 6e 64 20 61 20 6c 65 6e | data, a|nd a len|
|00000af0| 67 74 68 2e 20 20 49 74 | 73 20 6a 6f 62 20 69 73 |gth. It|s job is|
|00000b00| 20 74 6f 0d 74 68 65 6e | 20 72 65 74 75 72 6e 20 | to.then| return |
|00000b10| 74 68 65 20 64 61 74 61 | 20 61 6e 64 20 64 61 74 |the data| and dat|
|00000b20| 61 20 6c 65 6e 67 74 68 | 20 6f 66 20 77 68 61 74 |a length| of what|
|00000b30| 20 74 68 65 20 63 6f 6d | 70 61 72 65 20 64 61 74 | the com|pare dat|
|00000b40| 61 20 73 68 6f 75 6c 64 | 20 6c 6f 6f 6b 20 6c 69 |a should| look li|
|00000b50| 6b 65 2e 0d 0d 54 68 65 | 20 44 6f 43 6f 6d 70 61 |ke...The| DoCompa|
|00000b60| 72 65 44 61 74 61 20 70 | 72 6f 63 20 69 73 20 6a |reData p|roc is j|
|00000b70| 75 73 74 20 61 20 72 65 | 70 6c 61 63 65 6d 65 6e |ust a re|placemen|
|00000b80| 74 20 66 6f 72 20 49 55 | 4d 61 67 53 74 72 69 6e |t for IU|MagStrin|
|00000b90| 67 2e 20 20 50 61 72 61 | 6d 65 74 65 72 73 20 61 |g. Para|meters a|
|00000ba0| 72 65 20 61 73 20 65 78 | 70 65 63 74 65 64 2e 0d |re as ex|pected..|
|00000bb0| 54 6f 20 73 65 74 20 74 | 68 65 20 70 72 6f 63 73 |To set t|he procs|
|00000bc0| 2c 20 79 6f 75 20 66 69 | 72 73 74 20 6e 65 65 64 |, you fi|rst need|
|00000bd0| 20 74 6f 20 68 61 76 65 | 20 61 20 4c 69 73 74 20 | to have| a List |
|00000be0| 63 6f 6e 74 72 6f 6c 2e | 20 20 54 68 65 20 62 65 |control.| The be|
|00000bf0| 6c 6f 77 20 65 78 61 6d | 70 6c 65 20 61 73 73 75 |low exam|ple assu|
|00000c00| 6d 65 73 20 74 68 61 74 | 0d 74 68 65 20 77 69 6e |mes that|.the win|
|00000c10| 64 6f 77 20 68 61 73 20 | 61 20 73 69 6e 67 6c 65 |dow has |a single|
|00000c20| 20 4c 69 73 74 20 63 6f | 6e 74 72 6f 6c 2e 0d 0d | List co|ntrol...|
|00000c30| 0d 73 74 61 74 69 63 20 | 73 68 6f 72 74 20 20 20 |.static |short |
|00000c40| 20 4d 79 44 6f 43 6f 6d | 70 61 72 65 44 61 74 61 | MyDoCom|pareData|
|00000c50| 28 76 6f 69 64 20 2a 70 | 74 72 61 2c 20 76 6f 69 |(void *p|tra, voi|
|00000c60| 64 20 2a 70 74 72 62 2c | 20 73 68 6f 72 74 20 6c |d *ptrb,| short l|
|00000c70| 65 6e 61 2c 20 73 68 6f | 72 74 20 6c 65 6e 62 29 |ena, sho|rt lenb)|
|00000c80| 3b 0d 73 74 61 74 69 63 | 20 76 6f 69 64 20 20 20 |;.static| void |
|00000c90| 20 20 4d 79 47 65 74 43 | 6f 6d 70 61 72 65 44 61 | MyGetC|ompareDa|
|00000ca0| 74 61 28 76 6f 69 64 20 | 2a 73 72 63 2c 20 73 68 |ta(void |*src, sh|
|00000cb0| 6f 72 74 20 73 72 63 6c | 65 6e 2c 20 76 6f 69 64 |ort srcl|en, void|
|00000cc0| 20 2a 64 73 74 2c 20 73 | 68 6f 72 74 20 2a 64 73 | *dst, s|hort *ds|
|00000cd0| 74 6c 65 6e 29 3b 0d 73 | 74 61 74 69 63 20 42 6f |tlen);.s|tatic Bo|
|00000ce0| 6f 6c 65 61 6e 20 20 4d | 79 4b 65 79 46 69 6c 74 |olean M|yKeyFilt|
|00000cf0| 65 72 28 4c 69 73 74 48 | 61 6e 64 6c 65 20 6c 69 |er(ListH|andle li|
|00000d00| 73 74 2c 20 45 76 65 6e | 74 52 65 63 6f 72 64 20 |st, Even|tRecord |
|00000d10| 2a 65 76 65 6e 74 29 3b | 0d 0d 20 20 20 20 43 6f |*event);|.. Co|
|00000d20| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 20 20 20 63 74 |ntrolHan|dle ct|
|00000d30| 6c 3b 0d 20 20 20 20 4c | 69 73 74 48 61 6e 64 6c |l;. L|istHandl|
|00000d40| 65 20 20 20 20 20 20 6c | 69 73 74 3b 0d 20 20 20 |e l|ist;. |
|00000d50| 20 43 4c 44 61 74 61 48 | 6e 64 6c 20 20 20 20 20 | CLDataH|ndl |
|00000d60| 20 6c 69 73 74 44 61 74 | 61 3b 0d 0d 20 20 20 20 | listDat|a;.. |
|00000d70| 63 74 6c 20 3d 20 43 4c | 4e 65 78 74 28 77 69 6e |ctl = CL|Next(win|
|00000d80| 64 6f 77 2c 20 26 6c 69 | 73 74 2c 20 6e 69 6c 2c |dow, &li|st, nil,|
|00000d90| 20 31 2c 20 66 61 6c 73 | 65 29 3b 0d 20 20 20 20 | 1, fals|e);. |
|00000da0| 6c 69 73 74 44 61 74 61 | 20 3d 20 28 43 4c 44 61 |listData| = (CLDa|
|00000db0| 74 61 48 6e 64 6c 29 28 | 2a 63 74 6c 29 2d 3e 63 |taHndl)(|*ctl)->c|
|00000dc0| 6f 6e 74 72 6c 44 61 74 | 61 3b 0d 20 20 20 20 28 |ontrlDat|a;. (|
|00000dd0| 2a 6c 69 73 74 44 61 74 | 61 29 2d 3e 67 65 74 43 |*listDat|a)->getC|
|00000de0| 6f 6d 70 61 72 65 44 61 | 74 61 20 3d 20 4d 79 47 |ompareDa|ta = MyG|
|00000df0| 65 74 43 6f 6d 70 61 72 | 65 44 61 74 61 3b 0d 20 |etCompar|eData;. |
|00000e00| 20 20 20 28 2a 6c 69 73 | 74 44 61 74 61 29 2d 3e | (*lis|tData)->|
|00000e10| 64 6f 43 6f 6d 70 61 72 | 65 44 61 74 61 20 20 3d |doCompar|eData =|
|00000e20| 20 4d 79 44 6f 43 6f 6d | 70 61 72 65 44 61 74 61 | MyDoCom|pareData|
|00000e30| 3b 0d 20 20 20 20 28 2a | 6c 69 73 74 44 61 74 61 |;. (*|listData|
|00000e40| 29 2d 3e 6b 65 79 46 69 | 6c 74 65 72 20 20 20 20 |)->keyFi|lter |
|00000e50| 20 20 3d 20 4d 79 4b 65 | 79 46 69 6c 74 65 72 3b | = MyKe|yFilter;|
|00000e60| 0d 0d 20 20 20 20 20 20 | 20 20 54 68 65 20 61 62 |.. | The ab|
|00000e70| 6f 76 65 20 63 6f 64 65 | 20 66 69 72 73 74 20 67 |ove code| first g|
|00000e80| 65 74 73 20 74 68 65 20 | 66 69 72 73 74 20 28 6f |ets the |first (o|
|00000e90| 6e 6c 79 29 20 4c 69 73 | 74 20 63 6f 6e 74 72 6f |nly) Lis|t contro|
|00000ea0| 6c 20 69 6e 20 77 69 6e | 64 6f 77 2e 20 20 49 74 |l in win|dow. It|
|00000eb0| 20 74 68 65 6e 20 67 65 | 74 73 0d 20 20 20 20 20 | then ge|ts. |
|00000ec0| 20 20 20 74 68 65 20 6c | 69 73 74 44 61 74 61 20 | the l|istData |
|00000ed0| 72 65 63 6f 72 64 20 73 | 6f 20 74 68 61 74 20 69 |record s|o that i|
|00000ee0| 74 20 63 61 6e 20 73 74 | 6f 72 65 20 74 68 65 20 |t can st|ore the |
|00000ef0| 63 6f 6d 70 61 72 65 20 | 70 72 6f 63 73 20 69 6e |compare |procs in|
|00000f00| 74 6f 20 74 68 65 20 6c | 69 73 74 2e 20 20 54 68 |to the l|ist. Th|
|00000f10| 65 0d 20 20 20 20 20 20 | 20 20 70 72 6f 63 73 20 |e. | procs |
|00000f20| 61 72 65 20 74 68 65 6e | 20 73 74 6f 72 65 64 20 |are then| stored |
|00000f30| 69 6e 74 6f 20 74 68 65 | 20 72 65 63 6f 72 64 2e |into the| record.|
|00000f40| 0d 0d 0d 00 3e 00 03 00 | 00 00 00 00 0b 00 09 00 |....>...|........|
|00000f50| 04 00 00 00 09 00 00 00 | 00 00 00 00 00 0a 85 00 |........|........|
|00000f60| 0b 00 09 00 04 05 00 00 | 09 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 0a 8b 00 0b 00 09 00 | 04 00 00 00 09 00 00 00 |........|........|
|00000f80| 00 00 00 | |... | |
+--------+-------------------------+-------------------------+--------+--------+